import {lazy} from 'react'
import Home from '../view/Home'
const routes=[
    {
        path:'/dash',
        component:Home,
        title:'主菜单',
        show:true,
        children:[{
            path:'/dash/fenxi',
            component:lazy(()=>import('../view/dash/Fenxi')),
            title:'分析',
            show:true,
        },{
            path:'/dash/gongzuo',
            component:lazy(()=>import('../view/dash/Gongzuo')),
            title:'工作',
            show:true,
        },{
            path:'/dash/jiankong',
            component:lazy(()=>import('../view/dash/Jiankong')),
            title:'监控',
            show:true,
        },]
    },{
        path:'/form',
        component:Home,
        title:'表单页',
        show:true,
        children:[{
            path:'/form/fenbu',
            component:lazy(()=>import('../view/form/Fenbu')),
            title:'分布',
            show:true,
        },{
            path:'/form/gaoji',
            component:lazy(()=>import('../view/form/Gaoji')),
            title:'高级',
            show:true,
        },{
            path:'/form/jichu',
            component:lazy(()=>import('../view/form/Jichu')),
            title:'基础',
            show:true,
        },]
    },{
        path:'/list',
        component:Home,
        title:'列表页',
        show:true,
        children:[{
            path:'/list/chaxun',
            component:lazy(()=>import('../view/list/Chaxun')),
            title:'查询',
            show:true,
        },{
            path:'/list/kapian',
            component:lazy(()=>import('../view/list/Kapian')),
            title:'卡片',
            show:true,
        },{
            path:'/list/sousuo',
            component:lazy(()=>import('../view/list/Sousuo')),
            title:'搜索',
            show:true,
        },]
    },{
        path:'/login',
        component:lazy(()=>import('../view/Login')),
        title:'登录页',
        show:false,
    },{
        path:'/',
        redirect: '/dash',  // 重定向:重新指向其它path,会改变网址
        show:false,
    }
]

export default routes